package org.visionlibrary.image.geomtric.model;


import org.visionlibrary.image.geomtric.util.Debug;

public class TTriangle extends TShape {	
	private TTriangle(String name) {
		super(name);
	}

	public TTriangle(String name, Point2d a, Point2d b, Point2d c) {
		super(name);
		segments.add(new Vector2d(a, b));
		segments.add(new Vector2d(a, c));
		segments.add(new Vector2d(b, c));
	}

	@Override
	public TShape copy(String name) {
		TTriangle tcopy = new TTriangle(name);
		tcopy.segments = org.visionlibrary.image.geomtric.lines.Lines.copy(segments);
		return tcopy;
	}

	public String toString() {
		return Debug.Misc.getClassName(this.getClass()) + "("
				+ super.toString() + ");";
	}
}

